package com.example.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.commons.core.entity.Role;
import com.example.commons.core.vo.receive.RoleReceiveVo;
import com.example.commons.core.vo.result.RoleMenuResultVo;
import com.example.commons.core.vo.result.SystemDictTypeResultVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    List<Role> roleFindByUserId(@Param("userId") Long userId);

    /**
     * 根据条件查询角色列表，同时带出菜单信息
     * @param roleReceiveVo 条件
     * @return 角色列表
     */
    IPage<RoleMenuResultVo> getRoleMenuPage(IPage<RoleMenuResultVo> page, @Param("vo") RoleReceiveVo roleReceiveVo);
}
